package com.gimi.cloud.bbp.merchantZone.consumer.feign;

import com.gimi.cloud.bbp.dto.store.MerchantRangeDTO;
import com.gimi.cloud.bbp.dto.store.StoreDTO;
import com.gimi.cloud.bbp.merchantZone.consumer.feign.config.FeignMultipartSupportConfig;
import feign.Headers;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by shazhiwei on 2017/12/20.
 */
@FeignClient(name = "bbp-merchantZone-service",configuration = FeignMultipartSupportConfig.class)
public interface StoreFeignService {

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/add", method = RequestMethod.POST)
    String addStore(@RequestBody StoreDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/list", method = RequestMethod.POST)
    String storeList(@RequestBody StoreDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/allList", method = RequestMethod.POST)
    String allStoreList(@RequestBody StoreDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/single", method = RequestMethod.POST)
    String storeSingle(@RequestBody StoreDTO dto);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/auth", method = RequestMethod.POST)
    String storeAuth(@RequestBody StoreDTO dto);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/update", method = RequestMethod.POST)
    String updateStore(@RequestBody StoreDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/delete", method = RequestMethod.POST)
    String deleteStore(@RequestBody StoreDTO params);

    @Headers({"Content-Type: mutipart/form-data","Accept: application/json"})
    @RequestMapping(value = "/store/fileUpload", method = RequestMethod.POST)
    String fileUpload(MultiValueMap mutipartfiles);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/merchant/add", method = RequestMethod.POST)
    String addMerchantStore(@RequestBody MerchantRangeDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/merchant/update", method = RequestMethod.POST)
    String updateMerchantStore(@RequestBody MerchantRangeDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/merchant/list", method = RequestMethod.POST)
    String merchantStoreList(@RequestBody MerchantRangeDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/merchant/category_list", method = RequestMethod.POST)
    String merchantStoreAddList(@RequestBody MerchantRangeDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/store/merchant/delete", method = RequestMethod.POST)
    String deleteMerchantStore(@RequestBody MerchantRangeDTO params);
}
